home *** CD-ROM | disk | FTP | other *** search
/ 17 Bit Software 3: The Continuation / 17-Bit_The_Continuation_Disc.iso / amigan / amigan 7 / zoo / zoo.man < prev   
Text File  |  1994-01-27  |  15KB  |  526 lines

  1. ZOO(1)            UNIX Programmer's Manual           ZOO(1)
  2.  
  3.  
  4.  
  5. NAME
  6.      zoo - manipulate archives of files in compressed form
  7.  
  8. SYNOPSIS
  9.      zoo {acDehlPTuUvx}[acdEfnMNoOpPquv1] archive [file] ...
  10.      zoo -command archive [file] ...
  11.      zoo h
  12.  
  13. DESCRIPTION
  14.      Zoo is used to create and maintain collections of files in
  15.      compressed form.  It uses a Lempel-Ziv compression algorithm
  16.      that gives space savings in the range of 20% to 80% depend-
  17.      ing on the type of file data.
  18.  
  19.      The command zoo h gives summary of commands.
  20.  
  21.      Before storing a filename in an archive zoo strips out any
  22.      directory information.  If two or more files are specified
  23.      with identical filenames but differing directory names, only
  24.      one such filename is used. Zoo will not add an archive to
  25.      itself, nor add the archive's backup (with `.bak' extension
  26.      to the filename) to the archive, nor add the temporary file
  27.      {zoo}.@@@ to an archive.
  28.  
  29.      Zoo has two types of commands:  Expert commands, which con-
  30.      sist of one command letter followed by zero or more modifier
  31.      characters, and Novice commands, which consist of a hyphen
  32.      (`-') followed by a command word that may be abbreviated.
  33.      Expert commands are case-sensitive but Novice commands are
  34.      not.
  35.  
  36.      When zoo adds a file to an existing archive, it marks as
  37.      deleted any file that is replaced by a newly-added file.
  38.      Deleted files may be later undeleted.  Archives may be
  39.      packed to recover space occupied by deleted files.
  40.  
  41.      All commands assume that the archive name ends with the
  42.      characters `.zoo' unless a different extension is supplied.
  43.  
  44.      Novice commands
  45.  
  46.      Novice commands may be abbreviated down to a minimum of a
  47.      hyphen followed by at least one command character.  Each
  48.      Novice command works in two stages.  First, the command does
  49.      its intended work.  Then, if the result was that one or more
  50.      files were deleted in the specified archive, the archive is
  51.      packed.  If packing occurs, the original unpacked archive is
  52.      always left behind in the current directory, with an exten-
  53.      sion of `.bak'.  The Novice commands are as follows.
  54.  
  55.      -add    Adds the specified files to the archive.
  56.  
  57.  
  58.  
  59.  
  60. Printed 12/31/86    December 31, 1986            1
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67. ZOO(1)            UNIX Programmer's Manual           ZOO(1)
  68.  
  69.  
  70.  
  71.      -freshen
  72.       Adds a specified file to the archive if and only if an
  73.       older file by the same name already exists in the
  74.       archive.
  75.  
  76.      -delete
  77.       Deletes the specified files from the archive.
  78.  
  79.      -update
  80.       Adds a specified file to the archive either:    if an
  81.       older file by the same name already exists in the
  82.       archive or:  if a file by the same name does not
  83.       already exist in the archive.
  84.  
  85.      -extract
  86.       Extracts the specified files from the archive.  If no
  87.       file is specified all files are extracted.
  88.  
  89.      -move
  90.       Equivalent to -add except that source files are deleted
  91.       after addition.
  92.  
  93.      -print
  94.       Equivalent to -extract except that extracted data are
  95.       sent to standard output.
  96.  
  97.      -list
  98.       Gives information about the specified archived files
  99.       including any attached comments.  If no files are
  100.       specified all files are listed.  Deleted files are not
  101.       listed.
  102.  
  103.      -test
  104.       Equivalent to -extract except that the extracted data
  105.       are not saved but any errors encountered are reported.
  106.  
  107.      -comment
  108.       Allows the user to add or update comments attached to
  109.       archived files.  When prompted, the user may:  type a
  110.       carriage return to skip the file, leaving any current
  111.       comment unchanged;  or type a (possibly null) comment
  112.       of up to 65,535 characters terminated by `/end' (case-
  113.       insensitive) on a separate line;  or type the end-of-
  114.       file character (normally control D) to skip all remain-
  115.       ing files.
  116.  
  117.      -delete
  118.       Deletes the specified files.
  119.  
  120.      The correspondence between Novice and Expert commands is as
  121.      follows.
  122.  
  123.  
  124.  
  125.  
  126. Printed 12/31/86    December 31, 1986            2
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133. ZOO(1)            UNIX Programmer's Manual           ZOO(1)
  134.  
  135.  
  136.  
  137.      Novice                           Equivalent
  138.      Command    Description                   Expert Command
  139.      -------    -----------                   --------------
  140.      -add    add files to archive                 aP
  141.      -extract    extract files from archive             x
  142.      -move    move files to archive                 aMP
  143.      -test    test archive integrity                 xNd
  144.      -print    extract files and send to standard output    xp
  145.      -delete    delete files from archive             DP
  146.      -list    list information about archived files         l
  147.      -update    update archive by adding new or newer files  aunP
  148.      -freshen    freshen archive by adding newer files         auP
  149.      -comment    allows user to attach comments to files      c
  150.  
  151.      Expert commands
  152.  
  153.      The general format of expert commands is:
  154.  
  155.      zoo {acDehlPTuUvx}[dEfnMNoOpPquv1] archive[.zoo] [file] ...
  156.  
  157.      The characters enclosed within {} are commands.  Choose any
  158.      one of these.  The characters enclosed within [] just to the
  159.      right of the {} are modifiers and zero or more of these may
  160.      immediately follow the command character.    All combinations
  161.      of command and modifier characters may not be valid.
  162.  
  163.      Files are added to an archive with the command:
  164.  
  165.      zoo {au}[cfMnPqu] archive file ...
  166.  
  167.      Command characters are:
  168.  
  169.      a      Add each specified file to archive.  Any already-
  170.       archived file with the same name is marked as deleted.
  171.  
  172.      u      Do an update of the archive.    A specified file is added
  173.       to the archive only if a copy of it is already in the
  174.       archive and the copy being added is newer than the copy
  175.       already in the archive.
  176.  
  177.      The following modifiers are specific to these commands.
  178.  
  179.      M      Move files to archive.  This makes zoo unlink the ori-
  180.       ginal files after they have been added to the archive.
  181.       Files are unlinked after addition of files to the
  182.       archive is complete, and after any requested packing of
  183.       the archive has been done, and only if zoo detected no
  184.       errors.
  185.  
  186.      n      Add new files only.  A specified file is added only if
  187.       it isn't already in the archive.
  188.  
  189.  
  190.  
  191.  
  192. Printed 12/31/86    December 31, 1986            3
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199. ZOO(1)            UNIX Programmer's Manual           ZOO(1)
  200.  
  201.  
  202.  
  203.      P      Pack archive after files have been added.
  204.  
  205.      u      Applied to the a command, this modifier makes it behave
  206.       identically to the u command.
  207.  
  208.      The combination of the n modifier with the u modifier or u
  209.      command causes addition of a file to the archive either if
  210.      the file is not already in the archive, or if the file is
  211.      already in the archive but the archived copy is older than
  212.      the copy being added.
  213.  
  214.      Files are extracted from an archive with the command:
  215.  
  216.      zoo {ex}[dNoOpq] archive [file] ...
  217.  
  218.      The e and x commands are synonymous.  If no file was speci-
  219.      fied, all files are extracted from the archive.  All
  220.      extracted files go into the current directory.
  221.  
  222.      The following modifiers are specific to the e and x com-
  223.      mands:
  224.  
  225.      N      Do not save extracted data but report any errors
  226.       encounterd.
  227.  
  228.      O      Overwrite files.  Normally, if a file being extracted
  229.       would overwrite an already-existing file of the same
  230.       name, zoo asks you if you really want to overwrite it.
  231.       You may answer the question with `y', which means yes,
  232.       overwrite; or `n', which means no, don't overwrite; or
  233.       `a', which means assume the answer is `y' for this and
  234.       all subsequent files.  The O modifier makes zoo assume
  235.       that files may always be overwritten.
  236.  
  237.       The O, N, and p modifiers are mutually exclusive.
  238.  
  239.      o      This is equivalent to the O modifier if and only if it
  240.       is given at least twice.  It is otherwise ignored.
  241.  
  242.      p      Pipe extracted data to standard output.  Error messages
  243.       are piped to standard output as well.  However, if a
  244.       bad CRC is detected, an error message is sent both to
  245.       standard error and to standard output.
  246.  
  247.      Archived files are listed with the command:
  248.  
  249.      zoo {lLv}[adfv] archive[.zoo] [file] ...
  250.  
  251.      l      Information presented includes the date and time of
  252.       each file, its original and current (compressed) sizes,
  253.       and the percentage size decrease due to compression
  254.       (labelled CF or compression factor).    If no filename is
  255.  
  256.  
  257.  
  258. Printed 12/31/86    December 31, 1986            4
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265. ZOO(1)            UNIX Programmer's Manual           ZOO(1)
  266.  
  267.  
  268.  
  269.       supplied all files are listed except deleted files.
  270.  
  271.      L      This is identical to the l command except that all sup-
  272.       plied arguments must be archives and the contents of
  273.       each are listed.
  274.  
  275.      v      This causes a verbose listing, which additionally shows
  276.       any comment attached to each file.  Using the v modif-
  277.       ier with the l command has the same effect.
  278.  
  279.      The following modifier is specific to the archive list com-
  280.      mands:
  281.  
  282.      a      This gives a single-line format containing both each
  283.       filename and the name of the archive, sorted by archive
  284.       name.  It is especially useful with the L command,
  285.       since the result can be further sorted on any field to
  286.       give a master listing of the entire contents of a set
  287.       of archives.
  288.  
  289.      Files may be deleted and undeleted from an archive with the
  290.      following commands:
  291.  
  292.      zoo {DU}[Pq1] archive file ...
  293.  
  294.      The D command deletes the specified files and the U command
  295.      undeletes the specified files.  The 1 modifier (the digit
  296.      one, not the letter ell) forces deletion or undeletion of at
  297.      most one file.  If multiple instances of the same file exist
  298.      in an archive, use of the 1 modifier may allow selective
  299.      extraction of one of these.
  300.  
  301.      Comments may be added to an archive with the command:
  302.  
  303.      zoo c archive
  304.  
  305.      This behaves identically to the -comment command.
  306.  
  307.      The timestamp of an archive may be adjusted with the com-
  308.      mand:
  309.  
  310.      zoo T[q] archive
  311.  
  312.      Zoo normally attempts to maintain the timestamp of an
  313.      archive to reflect the age of the newest file stored in it.
  314.      Should the timestamp ever be incorrect it can be fixed with
  315.      the T command.
  316.  
  317.      An archive may be packed with the command:
  318.  
  319.      zoo P[EPq] archive
  320.  
  321.  
  322.  
  323.  
  324. Printed 12/31/86    December 31, 1986            5
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331. ZOO(1)            UNIX Programmer's Manual           ZOO(1)
  332.  
  333.  
  334.  
  335.      If the backup copy of the archive already exists, zoo will
  336.      refuse to pack the archive unless the P modifier is also
  337.      given.  The E modifier causes zoo not to save a backup copy
  338.      of the original archive after packing.  A temporary file
  339.      called `{zoo}.@@@' is used to initially hold the packed
  340.      archive.  This file will be left behind if packing is inter-
  341.      rupted or if for some reason this file cannot be renamed to
  342.      the name of the original archive when packing is complete.
  343.  
  344.      Packing removes any garbage data appended to an archive
  345.      because of Xmodem file transfer and also recovers spaced
  346.      used by comments that were replaced.
  347.  
  348.      General modifiers
  349.  
  350.      The following modifiers are applicable to several commands:
  351.  
  352.      c      Applied to the a and u commands, this causes the user
  353.       to be prompted for a comment for each file added to the
  354.       archive.  If the file being added has replaced a file
  355.       already in the archive, any comment attached to the
  356.       replaced file is shown to the user and becomes attached
  357.       to the newly-added file unless the user changes it.
  358.       Possible user responses are as described for the -com-
  359.       ment command.  Applied to the archive list command l,
  360.       the c modifier causes attached comments to archived
  361.       files to be listed.
  362.  
  363.      d      Most commands that act on an archive act only on files
  364.       that are not deleted.  The d modifier makes commands
  365.       act on both normal and deleted files.  If doubled as
  366.       dd, this modifier forces selection only of deleted
  367.       files.
  368.  
  369.      f      Applied to the a and u commands, the f modifier causes
  370.       fast archiving by adding files without compression.
  371.       Applied to l it causes a fast listing of files in a
  372.       multicolumn format.
  373.  
  374.      q      Be quiet.  Normally zoo lists the name of each file and
  375.       what action it is performing.  The q modifier
  376.       suppresses this.  When files are being extracted to
  377.       standard output, the q modifier suppresses the header
  378.       preceding each file.
  379.  
  380.       Error messages are never suppressed.
  381.  
  382.      Wildcard handling
  383.  
  384.      The shell normally expands wildcards to a list of matching
  385.      files.  Wildcards that are meant to match files within an
  386.      archive must therefore be escaped or quoted.  The wildcard
  387.  
  388.  
  389.  
  390. Printed 12/31/86    December 31, 1986            6
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397. ZOO(1)            UNIX Programmer's Manual           ZOO(1)
  398.  
  399.  
  400.  
  401.      syntax interpreted by zoo is limited to the following char-
  402.      acters.
  403.  
  404.      *      Matches any sequence of zero or more characters not
  405.       containing a dot.
  406.  
  407.      ?      Matches any single character except a dot.
  408.  
  409.       Arbitrary combinations of ``*'' and ``?'' are allowed.
  410.  
  411.      .      Required to match a dot in any filename.
  412.  
  413.       As a special case, the wildcard sequence ``*.*''
  414.       matches every filename including those that do not con-
  415.       tain a dot.
  416.  
  417.      c-c  Two characters separated by a hyphen specify a charac-
  418.       ter range.  All filenames beginning with those charac-
  419.       ters will match.  The character range may be specified
  420.       only by itself or preceded by a directory name.  It is
  421.       not specially interpreted if it is part of a filename.
  422.  
  423. FILES
  424.      {zoo}.@@@ - temporary file used during packing
  425.      archive_name.bak - backup of archive
  426.  
  427. SEE ALSO
  428.      compress(1)
  429.  
  430. BUGS
  431.      Filenames are converted to a format acceptable to MS-DOS.
  432.      Standard input cannot be archived nor can a created archive
  433.      be sent to standard output.  Spurious error messages may
  434.      appear if the filename of an archive is too long.
  435.  
  436. DIAGNOSTICS
  437.      Error messages are intended to be self-explanatory and are
  438.      divided into three categories.  WARNINGS are intended to
  439.      inform the user of an unusual situation, such as a CRC error
  440.      during extraction, or attempted extraction of a file that
  441.      would replace another that is newer.  ERRORS are fatal to
  442.      one file, but execution continues with the next file if any.
  443.      FATAL errors cause execution to be aborted.  The occurrence
  444.      of any of these causes an exit status of 1.  Normal termina-
  445.      tion without any errors gives an exit status of 0.
  446.  
  447. FUTURE DIRECTIONS
  448.      A revised version of zoo is in the works which will handle
  449.      filenames and directory names of up to 255 characters each,
  450.      allow numbering of multiple versions of a file, and automat-
  451.      ically perform end-of-line conversion for text files moved
  452.      between dissimilar systems.  It will be upward and downward
  453.  
  454.  
  455.  
  456. Printed 12/31/86    December 31, 1986            7
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463. ZOO(1)            UNIX Programmer's Manual           ZOO(1)
  464.  
  465.  
  466.  
  467.      compatible with existing versions of zoo.
  468.  
  469. AUTHOR
  470.      Rahul Dhesi
  471.  
  472.  
  473.  
  474.  
  475.  
  476.  
  477.  
  478.  
  479.  
  480.  
  481.  
  482.  
  483.  
  484.  
  485.  
  486.  
  487.  
  488.  
  489.  
  490.  
  491.  
  492.  
  493.  
  494.  
  495.  
  496.  
  497.  
  498.  
  499.  
  500.  
  501.  
  502.  
  503.  
  504.  
  505.  
  506.  
  507.  
  508.  
  509.  
  510.  
  511.  
  512.  
  513.  
  514.  
  515.  
  516.  
  517.  
  518.  
  519.  
  520.  
  521.  
  522. Printed 12/31/86    December 31, 1986            8
  523.  
  524.  
  525.  
  526.